﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/content/variable.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>产品后台</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <%@ include file="/content/head.jsp"%>
    <style type="text/css">
         html {
            overflow: hidden;
        }
    </style>
</head>
<body class="hold-transition skin-blue sidebar-mini fixed">
<div class="wrapper">
<!-- Main Header -->
<header class="main-header">
    <!-- Logo -->
    <a href="" class="logo">
        <!-- logo for regular state and mobile devices -->
        <span class="logo-lg"><b>产品后台</b></span>
    </a>
   
    <!-- Header Navbar -->
    <nav class="navbar navbar-static-top" role="navigation">
        <!-- Sidebar toggle button-->
        <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">切换导航</span>
        </a>
        <!-- Navbar Right Menu -->
        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
                <!-- Messages: style can be found in dropdown.less-->
                <li class="dropdown messages-menu">
                    <!-- Menu toggle button -->
                    <a href="javascript:refreshTab();" class="tabReload" >
                        <i class="fa fa-refresh">刷新当前</i>
                    </a>
                </li>
                <li>
                    <a href="javascript:dropOut();" class="tabReload" >
                        <i class="fa fa-refresh">退出</i>
                    </a>
                </li>
                
                <li>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </li>
            </ul>
        </div>
    </nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <ul class="sidebar-menu">
        </ul>
        <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper"  id="content-wrapper">
    <div class="content-tabs">
        <button class="roll-nav roll-left tabLeft" onclick="scrollTabLeft()">
            <i class="fa fa-backward"></i>
        </button>
        <nav class="page-tabs menuTabs tab-ui-menu" id="tab-menu">
            <div class="page-tabs-content" style="margin-left: 0px;">

            </div>
        </nav>
        <button class="roll-nav roll-right tabRight" onclick="scrollTabRight()">
            <i class="fa fa-forward" style="margin-left: 3px;"></i>
        </button>
        <div class="btn-group roll-nav roll-right">
            <button class="dropdown tabClose" data-toggle="dropdown">
            	页签操作
            <i class="fa fa-caret-down" style="padding-left: 3px;"></i>
            </button>
            <ul class="dropdown-menu dropdown-menu-right" style="min-width: 128px;">
                <li><a class="tabCloseCurrent" href="javascript:closeCurrentTab();">关闭当前</a></li>
                <li><a class="tabCloseAll" href="javascript:closeOtherTabs(true);">全部关闭</a></li>
                <li><a class="tabCloseOther" href="javascript:closeOtherTabs();">除此之外全部关闭</a></li>
            </ul>
        </div>
        <button class="roll-nav roll-right fullscreen" ><i class="fa fa-arrows-alt"></i></button>
    </div>
<!-- 子页面 -->
    <div class="content-iframe " style="background-color: #ffffff; ">
        <div class="tab-content " id="tab-content">
        </div>
    </div>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Main Footer -->
<footer class="main-footer">
    <!-- To the right -->
    <div class="pull-right hidden-xs">
       	就要游项目组
    </div>
    <!-- Default to the left -->
   		 版权所有 &copy;xxxxx 2015-2018&nbsp;&nbsp;&nbsp;&nbsp;   粤ICP备xxxxx号-x
</footer>
<div class="control-sidebar-bg"></div>
</div>
<%@ include file="/content/js.jsp"%>
<script type="text/javascript">
	function dropOut(){
		window.location.href="<%=path%>/logout";	
	}
	var pathStr = "${pageContext.request.contextPath}";
	pathStr=pathStr.replace("/","");
    $(function() {
        addTabs(({ id: '10000', title: '欢迎页', close: false, url: pathStr+'/welcome' }));
        App.fixIframeCotent();
//         var menus = [
//              { id: "10001", text: "菜单栏", isHeader: true },
//               {
//                   id: "10002",
//                   text: "系统管理",
//                   icon: "fa fa-circle-o",
//                   children: [
//                       {   id: "10003", 
//                     	  text: "数据字典", 
//                     	  url: pathStr+"/dictionary/list",
//                     	  targetType: "iframe-tab", 
//                     	  icon: "fa fa-table" },
//                     	{ id: "10004", 
//                           text: "用户管理", 
//                           url: pathStr+"/user/list",
//                           targetType: "iframe-tab", 
//                           icon: "fa fa-table" },
//                       	{ id: "10005", 
//                               text: "菜单管理", 
//                               url: pathStr+"/modelInfo/list",
//                               targetType: "iframe-tab", 
//                               icon: "fa fa-table" },
//                         { id: "10006", 
//                               text: "角色管理", 
//                               url: pathStr+"/role/list",
//                               targetType: "iframe-tab", 
//                               icon: "fa fa-table" },      
//                   ]
//               },
//               {
//                   id: "20001",
//                   text: "客户管理",
//                   icon: "fa fa-circle-o",
//                   children: [
//                       { id: "20002", 
//                     	text: "客户信息", 
//                     	targetType: "iframe-tab", 
//                     	url: pathStr+'/client/list',
//                     	icon: "fa fa-table" },
//                   ]
//               },
//         ];
        $.ajax({
            data : "",
            type : "POST",
            url : "<%=path%>/menuTree",
            error : function(data) {
                alert("出错了！！:" + data);
            },
            success : function(data) {
                $('.sidebar-menu').sidebarMenu({data: data.rows, param: {strUser: 'admin'}});
            }
        });
//         $('.sidebar-menu').sidebarMenu({ data: menus, param: { strUser: 'admin' } });
    });
</script>
</body>
</html>
